package com.jianqiao.delivery.delivery.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jianqiao.delivery.delivery.domain.DeliveryEntity;
import com.ruoyi.common.core.domain.AjaxResult;

import java.util.List;
import java.util.Map;

/**
 * author: cyx
 * create: 2024/5/24 17:48
 **/
public interface DeliveryService extends IService<DeliveryEntity> {

    Map<String ,Object> selectDeliver(String statusCode ,Integer pageNum ,Integer pageSize ,String uid);

    DeliveryEntity selectDetail(String id);

    int cancelDelivery(String id);

    Map<String ,Integer> countDelivery(String uid);
//    int insertDelivery(DeliveryEntity[] deliveryEntities);
    Integer insertDelivery(DeliveryEntity[] deliveryEntities ,String uid);

//    String payOrder(String id ,Long uid);

    public void insertCity();

    public int uploadPaymentUrl(String url ,String deliveryId);

    public void paySuccess(String deliveryOrderId);

    /**
      *methood: 根据单号查快递订单
      *auth: cyx
      *time: 2024/11/30 14:29
    **/
    public List<DeliveryEntity> listByOrderNumber(String number);

    /**
     * methood: 确认收货
     * auth: cyx
     * time: 2024/11/30 16:41
     **/
    public Map receive(String orderId, Long userId);

    /**
      *methood: 生成二维码
      *auth: cyx
      *time: 2024/12/5 8:37
    **/
    public String createQrcode(String orderNumber);

    /**
     *methood: 生成条形码
     *auth: cyx
     *time: 2024/12/5 16:21
     **/
    public String createBarcode(String orderNumber ,String id);

    /**
      *methood: 根据包裹id查询订单及包裹信息
      *auth: cyx
      *time: 2024/12/6 13:54
    **/
    public DeliveryEntity selectOrderByPackageId(String packageId);

    /**
      *methood: 扫码出入库
      *auth: cyx
      *time: 2024/12/6 19:20
    **/
    public AjaxResult inOrOutByScan(String packageId , String type);
}
